package com.itfitness.cppdemoone

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.databinding.DataBindingUtil
import com.itfitness.cppdemoone.activity.*
import com.itfitness.cppdemoone.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {
    companion object {
        // Used to load the 'cppdemoone' library on application startup.
        init {
            System.loadLibrary("cppdemoone")
        }
    }
    private lateinit var mainBinding: ActivityMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        mainBinding = DataBindingUtil.setContentView(this,R.layout.activity_main)
        mainBinding.lifecycleOwner = this
        initListener()
    }

    private fun initListener() {
        mainBinding.btOne.setOnClickListener {
            startActivity(Intent(this@MainActivity,BoundaryFillActivity::class.java))
        }

        mainBinding.btTwo.setOnClickListener {
            startActivity(Intent(this@MainActivity,AddWeightActivity::class.java))
        }

        mainBinding.btThree.setOnClickListener {
            startActivity(Intent(this@MainActivity, CutoutActivity::class.java))
        }

        mainBinding.btFour.setOnClickListener {
            startActivity(Intent(this@MainActivity, EdgeCuttingActivity::class.java))
        }

        mainBinding.btFive.setOnClickListener {
            startActivity(Intent(this@MainActivity, HistogramAverageActivity::class.java))
        }
    }
}